@import "scrollbar";
@import "theme";
@import "mixin";
body {
    background-color: $bodyBg;
}

a {
    color: $fg;
    text-decoration: none;
}

.container {
    margin: 0 auto;
    max-width: 1200px;
    padding-right: 15px;
    padding-left: 15px;
}
header,
footer {
    background-color: $headerBg;
    color: $headerFg;
    a {
        color: $headerFg;
    }
    ul,
    li {
        list-style: none;
    }
}
header {
    .container {
        padding-right: 0;
        padding-left: 0;
    }
}
footer {
    padding: 20px 0;
    .copyright {
        text-align: center;
    }
}
.friend-link {
    position: relative;
    padding-left: 100px;
    >div:first-child {
        position: absolute;
        left: 0;
        width: 90px;
        border-right: 5px solid #fff;
        text-align: center;
    }
    a {
        margin-right: 20px;
    }
}

.nav-bar {
    li {
        line-height: 60px;
        height: 60px;
        display: inline-block;
        padding: 0 20px;
        position: relative;
        &:hover {
            border-bottom: 3px solid #fff;
            .sub-nav {
                display: block;
            }
        }
    }
    .search-icon {
        cursor: pointer;
        &:hover {
           border-bottom: none; 
        }
    }
    ul {
        display: inline-block;
        &.nav-right {
            float: right;
        }
    }
    .sub-nav {
        display: none;
        position: absolute;
        background-color: #fff;
        box-shadow: 0px 2px 8px 1px rgba(0,0,0,0.2);
        left: 0;
        width: 100%;
        margin-top: -5px;
        z-index: 66;
        a {
            color: #333;
            display: block;
            &:hover {
                background-color: #f2f2f5;
                text-decoration: none;
                color: #eb7350;
            }
        }
        ul {
            display: block;
        }
        li {
            display: block;
            padding: 0;
            text-align: center;
            height: 40px;
            line-height: 40px;
        }
    }
    .nav-bar-toggle {
        display: none;
    }
    .new-tip {
        display: inline-block;
        width: 10px;
        height: 10px;
        background-color: yellow;
        border-radius: 50%;
        position: absolute;
        top: 10px;
    }
}


.metro-grid {
    margin: 50px 0;
    display: flex;
    align-items: baseline;
    justify-items: center;
    flex-wrap: wrap;
    justify-content: center;
    a {
        display: block;
        line-height: 80px;
        height: 80px;
        width: 300px;
        font-size: 30px;
        text-align: center;
        background-color: $bg;
        margin: 8px;
        box-shadow: $shadow 0 0 10px;
        position: relative;
        overflow: hidden;
        &.unknow {
            img {
                height: 20px;
            }
        }
        .desc {
            font-size: 20px;
            line-height: 40px;
            position: absolute;
            bottom: -40px;
            text-align: center;
            width: 100%;
            color: #af5d0d;
        }
        .name,
        .desc {
           transition: all 1s;  
        }
        &:hover {
            .name {
                transform: scale(.6) translateY(-30px);
            }
            .desc {
                bottom: 0;
            }
        }
    }
}

.panel {
    background-color: $bg;
    margin-bottom: 20px;
    .panel-header {
        line-height: 50px;
        padding-left: 20px;
        border-left: 5px solid $border;
        font-size: 20px;
        font-weight: 700;
        small {
            font-size: 12px;
            font-weight: 200;
            color: #767676;
        }
        .panel-menu {
            font-size: 14px;
            float: right;
            font-weight: 500;
            padding-right: 10px;
            a {
                margin-left: 10px;
            }
        }
    }
    .panel-body {
        .metro-grid {
            margin: 0;
        }
        .list-item {
            display: grid;
            grid-template-columns: 1fr 100px;
            line-height: 40px;
            padding-left: 20px;
            .name {
                height: 40px;
                overflow: hidden;
            }
            .time {
                text-align: right;
                color: $secondaryFg;
            }
            &:hover {
                box-shadow: $shadow 0 0 10px;  
            }
        }
        &.scoll-box {
            max-height: 300px;
            overflow-y: auto;
            @include scrollbar();
            .more {
                text-align: center;
                line-height: 30px;
                display: block;
            }
        }
        .note-item {
            border-bottom: rgba($border, .1) solid 1px;
            box-sizing: border-box;
            padding: 10px;
            counter-increment: item-counter;
            text-decoration: none;
            word-break: break-all;
            .item-time {
                color: #ccc;
                font-size: 14px;
                text-align: right;
            }
        }
    }
}



.btn-show {
    background: transparent;
	display: inline-block;
	vertical-align: middle;
	transform: translateZ(0);
	box-shadow: 0 0 1px rgba(0, 0, 0, 0);
	backface-visibility: hidden;
	position: relative;
	transition-property: color;
    transition-duration: 0.3s;
    &:before {
        content: "";
        position: absolute;
        z-index: -1;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background: $headerBg;
        transform: scaleX(0);
        transform-origin: 50%;
        transition-property: transform;
        transition-duration: 0.3s;
        transition-timing-function: ease-out;
    }
    &:hover, 
    &:focus, 
    &:active {
        color: white;
    }
    &:hover:before, 
    &:focus:before, 
    &:active:before {
        transform: scaleX(1);
    }
}


.contact-box {
    padding: 20px;
    margin-bottom: 50px;
    .heading {
        p {
            color: rgb(179, 177, 177);
            font-size: 15px;
            margin: 1.2% 0px;
            font-family: 'Play-Regular';
            line-height: 1.6em;
        }
    }
    input[type="text"],
    input[type="email"],
    textarea {
        width: 100%;
        padding: 12px 12px;
        border: 1px solid #BDBCBC;
        font-size: 15px;
        margin-bottom: 1.5em;
        color: #808080;
        outline: none;
        font-weight: 400;
        font-family: 'Play-Regular';
    }
    textarea {
        resize: none;
        height: 192px;
    }
    button {
        width: 100px;
        border: 1px solid $border;
        border-radius: 0;
    }
}

.about-box,
.contact-box {
    background-color: $bg;
    padding: 20px;
    .heading {
        h3, 
        h1, 
        h2 {
            color: $fg;
            font-size: 2.1em;
            font-weight: 500;
            margin: 0;
            text-transform: uppercase;
        }
    }
}

.about-header {
    margin-top: 50px;
    margin-bottom: 30px;
}

.person-box {
    background-color: #fff;
    padding: 20px 10px;
    color: #555;
    .avatar {
        text-align: center;
        img {
            padding: 2px;
            max-width: 120px;
            height: auto;
            border: 1px solid #eee;
        }
    }
    .name {
        text-align: center;
        color: #222;
        line-height: 40px;
        font-weight: 600;
    }
    .desc {
        line-height: 30px;
        text-align: center;
        border-top: 1px dotted #ccc;
        border-bottom: 1px dotted #ccc;
    }
    .links {
        margin-top: 10px;
        line-height: 30px;
        a {
            color: #333;
            display: inline-block;
            width: 45%;
            padding: 0 10px;
            &:hover {
                border-radius: 4px;
                background: #eee;
            }
        }
    }
}

.about-box {
    .about-top {
        text-align: center;
    }
    .about-bottom {
        h4 {
            color: rgb(34, 34, 34);
            font-size: 1.2em;
            margin: 2.1% 0px 0px;
            line-height: 1.3em;
            font-family: 'Play-Regular';
        }
        p {
            color: $secondaryFg;
            font-size: 15px;
            margin: 5px 0px 0px;
            font-family: 'Play-Regular';
            line-height: 1.6em;
        }
    }
    .autograph {
        line-height: 30px;
        color: $fg;
        text-align: right;
    }
}

.friend-box {
    margin: 50px 0;
    background-color: $bg;
    min-height: 300px;
    line-height: 40px;
    padding: 20px 10px;
    .friend-link {
        padding-left: 150px;
        > div:first-child {
            width: 140px;
            border-right: 5px solid $border;
            font-size: 20px;
        }
    }
}

.link-box {
    margin: 50px 0;
    min-height: 300px;
    .panel-body {
        padding: 10px;
        line-height: 30px;
    }
}

.friend-apply {
    text-align: right;
    margin-bottom: 30px;
    .btn {
        border: 1px solid $border;
        background-color: $bg;
    }
}

.apply-dialog {
    input {
        height: 30px;
        width: 300px;
    }
}

.page-not-found {
    margin-top: 10vh;
    p{
        text-align: center;
        font-size: 20px;
    }
    .content {
        text-align: center;
        img {
            max-width: 100%;
        }
    }
}

.dialog-cookie-tip {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: $bg;
    box-shadow: $shadow 0 0 10px;
    padding: 40px 20px;
    .dialog-footer {
        text-align: right;
        .btn {
            background-color: $headerBg;
            color: $headerFg;
        }
    }
    a {
        color: $secondary;
    }
}

.dialog-search {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    z-index: 99;
    background-color: rgba($color: #e97474, $alpha: .7);
    .dialog-close {
        @include icon("\f00d", 48px);
        position: absolute;
        right: 0;
        background-color: yellow;
        padding: 5px 10px;
    }
    .dialog-body {
        padding: 80px 20px;
    }
    form {
        position: relative;
        .input-search,
        .input-clear {
            position: absolute;
            top: 0;
            width: 50px;
            line-height: 48px;
            background: 0 0;
            border: none;
            color: #ddd;
            outline: 0;
            padding: 0 10px;
        }
        .input-search {
            left: 0;
            @include icon("\f002", 25px);
        }
        .input-clear {
            right: 0;
            @include icon("\f00d", 25px);
            display: none;
        }
        input {
            width: 100%;
            height: 50px;
            line-height: 50px;
            font-size: 16px;
            color: #999;
            border: none;
            outline: 0;
            padding: 0 0 0 45px;
            border: 1px solid #e6e6e6;
        }
    }
    .search-suggestion {
        width: 100%;
        border-radius: 0 0 10px 10px;
        background: #fff;
        box-shadow: 0 4px 5px 0 #cccccc94;
        overflow: hidden;
        li {
            border-top: 1px solid #f2f2f2;
            line-height: 50px;
            font-size: 14px;
            padding: 0 10px;
            color: #777;
            cursor: pointer;
            list-style: none;
            span {
                display: inline-block;
                width: 30px;
                height: 30px;
                font-size: 12px;
                line-height: 30px;
                text-align: center;
                background: #e5e5e5;
                margin-right: 10px;
                border-radius: 50%;
                color: #999;
            }
            &.active {
                background-color: rgba(153,153,153,.1);
            }
        }
    }
    &.inputting {
        form {
            .input-clear {
                display: block;
            }
            input {
                padding: 0 45px;
            }
        }
    }
}

@media (max-width: 640px) {
    .metro-grid {
        a {
            width: 120px;
            height: 40px;
            line-height: 40px;
            font-size: 20px;
            &.unknow {
                display: none;
            }
        }
    }
    .nav-bar {
        .nav-bar-toggle {
            padding: 15px 20px;
            @include icon("\f0c9", 30px);
        }
        ul {
            display: none;
            background-color: $secondary;
            li {
                display: block;
                line-height: 40px;
                height: auto;
            }
            .sub-nav {
                display: block;
                position: static;
                margin: 0;
                margin: 0 -20px;
                width: auto;
                a {
                    color: #fff;
                }
            }
            &.nav-right {
                float: none;
            }
        }
        .new-tip {
            display: none;
        }
        &.open {
            ul {
                display: block;
            }
            .nav-bar-toggle {
                &::before {
                    content: "\f00d";
                }
            }
        }
    }
}